package com.vodone.v1pin.userInfo.delegate
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.model.MainModelLocator;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	
	import mx.rpc.http.mxml.HTTPService;
	
	public class SystemMailDelegate
	{
		public static function getMailListByType( resultHandler:Function , type:int = 0 , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getSystemMailService;
			var params:Object = {
				userid : MainModelLocator.getInstance().userLoginVO.userId,
				type:type
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
		public static function deleteSystemMail( resultHandler:Function , id:String , type:int = 1 , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().deleteSystemMailService;
			var params:Object = {
				userid:MainModelLocator.getInstance().userLoginVO.userId,
				messageid : id,
				type:type
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
		
	}
}